import { request } from '@/utils/request';

const url = '/api/console/menu';
export default {
  // 带权限校验的路由
  routers: () => request.get({ url: `${url}/routers` }),
  list: () => request.get({ url }),
  add: (data: any) => request.post({ url, data }),
  update: (data: any) => request.patch({ url, data }),
  del: (id: number) => request.delete({ url: `${url}/${id}` }),
  detail: (id: number) => request.get({ url: `${url}/${id}` }),
  display: (id: number, val: number) => request.patch({ url: `${url}/display/${id}/${val}` }),
  quickmenu: (id: number, val: number) => request.patch({ url: `${url}/quickmenu/${id}/${val}` }),
  listorder: (id: number, val: number) => request.patch({ url: `${url}/listorder/${id}/${val}` }),
};
